import BaseApi from '../BaseApi';

const controller = "/deviceType";
export default {


    addDeviceType(condition) {
        return this.requestPost(controller, "/addDeviceType", condition);
    },

    delDeviceType(condition) {
        return this.requestPost(controller, "/delDeviceType", condition);
    },

    updateDeviceType(condition) {
        return this.requestPost(controller, "/updateDeviceType", condition);
    },
    getDeviceTypeList(condition) {
        return this.requestPost(controller, "/getDeviceTypeList", condition);
    },

    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    }

    ,
    requestDownLoadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    }
}
